Skip to content

fix(browser): handle object list access denied - #187

Closed
GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:agent/fix-object-list-access-denied
Closed

fix(browser): handle object list access denied#187
GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:agent/fix-object-list-access-denied

Conversation

@GatewayJ

Copy link
Copy Markdown
Member

Pull Request

Description

Keep the object browser on the selected bucket when object listing is denied, matching MinIO Console behavior.

The previous HeadBucket preflight redirected on 403 before the authoritative ListObjectsV2 request could determine whether the bucket contents were readable. This change:

  • relies on ListObjectsV2 as the source of truth for object-list access;
  • renders persistent access-denied and load-failed states instead of presenting failures as an empty bucket;
  • clears stale rows when a paginated list request is denied;
  • provides an in-context retry action for ordinary list failures;
  • loads bucket versioning only for sessions that can delete objects and keeps deletion fail-closed when the versioning state cannot be read;
  • adds localized permission guidance and regression coverage.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed
pnpm install --frozen-lockfile
pnpm type-check
pnpm lint
pnpm test:run
pnpm exec prettier --check .
git diff --check

All 372 tests pass. The local Console login flow was also smoke-tested in the browser with no framework errors.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Closes #185

Screenshots (if applicable)

Not included because reproducing the permission-denied state requires dedicated read-only credentials.

Additional Notes

The latest main branch contained four Prettier-only differences in the SSE page. They are formatted here together with a whitespace-tolerant update to the associated source assertion so the required repository-wide format check passes.

Validation ran with Node.js 24.14 because Node.js 22 was not available through nvm in the local environment.

@GatewayJ GatewayJ closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] The built-in read-only permission cannot open the storage bucket

1 participant